package com.test;


import com.test.netty.websocket.WSConfig;
import com.test.netty.websocket.WebSocketServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        startSpringBoot(args);
//        startWebSocketServer();
    }

    private static void startSpringBoot(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    private static void startWebSocketServer() {
        WSConfig.WEBSOCKET_PORT = 8988;
        WSConfig.WEBSOCKET_URL = "ws://localhost:" + WSConfig.WEBSOCKET_PORT;
        new WebSocketServer().run(WSConfig.WEBSOCKET_PORT);
    }
}
